(function() {

	$.kpi = {
		getKpiAttr : function(postData, callBack) {

			var reportId = postData.reportId || 'kpi-common.getKpiAttr';
			this.getData(postData, reportId, callBack);
		},
		getKpi : function(postData, callBack) {

			var reportId = postData.reportId || 'kpi-common.getKpi';
			this.getData(postData, reportId, callBack);
		},
		getData : function(postData, sqlId, callBack) {
			var postData_ = $.extend( {}, postData || {});
			postData_.sqlId = sqlId;
			
			$.ajax( {
				url : jsContextPath + '/dataReader/getDataObj.do',
				type : 'post',
				data : postData_,
				dataType : 'json',
				success : function(data, stauts, XHR) {
					
					var obj = data.dataObj;
					if ($.isFunction(callBack)) {
						callBack(obj);
					}
				}
			});
		}
	}

})()